package cn.itcast.hotel.controller;

import cn.itcast.hotel.pojo.PageResult;
import cn.itcast.hotel.pojo.RequestParams;
import cn.itcast.hotel.service.IHotelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.io.IOException;

@RestController
@RequestMapping("/hotel")
public class HotelController {
    @Autowired
    public IHotelService hotelService;
    //分页查询
    @PostMapping("/list")
    public PageResult getPage(@RequestBody RequestParams requestParams) throws IOException {
      return   hotelService.getPage(requestParams);
    }


}
